<template>
    <div class="homeLeft">
        <ul>
            <li v-for="item in sortList" :key="item.id" @click="handleSort(item.id)">{{item.title}}</li>
        </ul>
    </div>
</template>

<script>
export default {
    data () {
        return {
            sortList:[
                {title:'行业动态',id:1},
                {title:'公司新闻',id:2},
            ]
        }
    },
    methods: {
        handleSort(id){
            this.$router.push({
                path:'/home',
                query:{
                    id,
                    timestamp:Date.now(),
                }
            });
            this.$emit('update:childId',id);
        }
    }
}
</script>

<style scoped lang="scss">
.homeLeft {
    ul {
        li {
            padding: 8px;
        }
    }
}
</style>